﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PNAB.DAL
{
    /// <summary>
    /// Single access point to the database management operations. 
    /// Here user can find an instance of the repository for the entity
    /// he/she wants to operate on.
    /// </summary>
    public interface IUnitOfWork
    {
        IGenericRepository<Account> AccountsRepo { get; set; }

        /// <summary>
        /// Method responsible for commiting the database transaction.
        /// Method should throw an exception, if the selected commit 
        /// operation has failed, describing the reason of failure.
        /// </summary>
        void Save();
    }

        
}
